<script>
import Common from "@/mixins/order/commonbg.js";
import OrderService from "@/api/order/OrderService.js";
import PPMForm from "@/crm3.0part7-ppm/core/ppmForm.vue";
export default {
  name: "mstp20488",
  mixins: [PPMForm, Common],
  data() {
    return {
      //MSTP	正常变更	发起局变更
      // proName: 'MSTP'
      accountUnitCode:'',
      startDate:{
        disabledDate(time) {
          return time.getTime() < Date.now() - 3600 * 1000 * 24 * 1;//限制初始日期
        }
      }
    };
  },
  async mounted() {
     await this.initCommon();
  },

  computed: {
    
  },
  methods: {
    //获取input-grid选中的值
    getInputGridValue(obj) {
      if(obj.data.orgId){
           this.formData["23864-142002621"].value = obj.data.orgId;
           this.formData["23864-142002621"].text = obj.data.accountUnitName;
           this.accountUnitCode=obj.data.accountUnitCode;
      }else{
            this.formData["23864-142002621"].value = "";
            this.formData["23864-142002621"].text = "";
            this.$confirm("不能选择此单位为发起局!", "提示", {
            confirmButtonText: "关闭",
            showCancelButton: false,
            type: "warning",
            center: true,
          });
      }
    },
    isModContactLimit() {
      if(this.formData["23864-142000765"].value=='1'){
        this.SetRequired({ attrName:'合同终止日期', formkey:'23864-142002037', reqName:'empty', reqStatus:true});
      }else{
        this.SetRequired({ attrName:'合同终止日期', formkey:'23864-142002037', reqName:'empty', reqStatus:false});
      }
    },
    StartDate(key) {
      if(key == '23864-100012033'){
        return this.startDate;
      }
    },
  },
};
</script>

